// 控制面板
.tp-hide-controller {
  .tp-control-panel {
    display: none;
  }
}

.tp-control-panel {
  position: absolute;
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;

  // 播放按钮
  .tp-play-icon,
  .tp-loading {
    color: white;
    cursor: pointer;
    overflow: hidden;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    box-sizing: border-box;
    display: grid;
    place-content: center;
    svg {
      width: 50px;
      height: 50px;
    }
  }

  @keyframes tp-loading {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  .tp-loading {
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.4);

    // 加载动画
    svg {
      animation: tp-loading 1s infinite;
      width: 40px;
      height: 40px;
    }
  }

  // 底部控制栏
  .tp-control-bar {
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 35px;
    user-select: none;
    transition: all 0.3s ease;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.4));
    color: white;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;

    // 播放进度条
    .tp-seek-slider {
      width: 100%;
      flex: 1;
    }

    .tp-volume-bar {
      width: 80px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .tp-volume-icon,
    .tp-fullscreen {
      display: inline-block;
      width: 20px;
      height: 20px;
      text-align: center;
      color: white;
    }

    .tp-volume-slider {
      width: 60px;
    }

    .tp-play-time {
      font-family: Menlo, Courier New, Consolas, Lucida Console, Courier, monospace;
      font-size: 14px;
      text-align: center;
      user-select: none;
      min-width: 120px;
    }
    .tp-play-time-tip {
      display: none;
      width: 50px;
      text-align: center;
      position: absolute;
      top: -30px;
      left: -10px;
      pointer-events: none;
      background-color: #000;
      color: #fff;
      padding: 5px;
      border-radius: 4px;
      font-size: 14px;

      &::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: #000 transparent transparent transparent;
      }
    }
  }
}
